package com.ruoyi.yanjing.constant;


/**
 * @author whz
 */
public class Constant {
	
	public static final String RANDOMCODEKEY = "RANDOMVALIDATECODEKEY";// 验证码放到session中的key
	
	public final static String WEB_PRIVATE_KEY="asiuepf8ur98cvjh823498qewufsdujfklasef";
	public final static String CASH_ACCOUNT_PASSWORD="123456";
	public final static String COMPANY_EMPLOYEE_NAME="企业管理员";
	public final static String COMPANY_EMPLOYEE_ACCOUNT="admin";
	public final static String COMPANY_EMPLOYEE_PASSWORD="123456";
	
	public final static int WEB_ORDER_OVER = 120;
	
	public final static String DEFAULT_LOCATION = "www";
	
	public final static Long SYS_COMPANY_ID = 1L;
	
	public final static String EMPLOYEE_SESSION = "employeeInfo";
	
	public final static String SESSION_USER = "userInfo";
	
	public final static String SYS_COMPANY_CODE = "000001";
	
	public final static String PAYMENT_SUBJECT = "十月妈妈母婴商城订单付款";
	public final static String PAYMENT_DRAW = "十月妈妈母婴商城提现打款";
	public final static String PAYMENT_RECHARGE = "十月妈妈母婴商城账户充值";

	
	public static enum COMMON_LOGIN_STATUS {
		TRUE("是"),
		FALSE("否");
		private String cnName;
		COMMON_LOGIN_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_LOGIN_STATUS item: COMMON_LOGIN_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_STATUS {
		ENABLE("启用"),
		NORMAL("正常"),
		CANCEL("停用"),
		TEST("临时"),
		APPROVEING("待审核"),
		APPRVOED("审核通过"),
		DELETE("删除"),
		FINISH("完成"),
		FRZE("冻结"),
		RALEASED("发布完成");
		private String cnName;
		COMMON_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_STATUS item: COMMON_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_HANDLE_STATUS {
		UNHANDLE("待处理"),
		HANDLEING("处理中"),
		FINISH("处理完成");
		private String cnName;
		COMMON_HANDLE_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_HANDLE_STATUS item: COMMON_HANDLE_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_NOTIFY {
		TRUE("已通知"), 
		FALSE("未通知");
		private String cnName;
		COMMON_NOTIFY(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_NOTIFY item: COMMON_NOTIFY.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_LEVEL {
		SYSTEM("系统级别"),
		USER("企业级别");
		private String cnName;
		COMMON_LEVEL(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_LEVEL item: COMMON_LEVEL.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	 
	public static enum EMPLOYEE_TYPE {
		ADMIN("企业管理员"),
		USER("普通用户");
		private String cnName;
		EMPLOYEE_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(EMPLOYEE_TYPE item: EMPLOYEE_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	/**
	 * 认证类型
	 * @author kevin
	 *
	 */
	public static enum IDEN_TYPE {
		COMPANY("企业"),
		USER("个人");
		private String cnName;
		IDEN_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(IDEN_TYPE item: IDEN_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_APPROVE_STATUS { 
		CREATE("待提交"),
		UNVERIFIED("待审核"),
		APPROVEING("审核中"),
		PASS("审核通过"),
		COMMEND("推荐"),
		FAIL("审核不通过");
		
		private String cnName;
		COMMON_APPROVE_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_APPROVE_STATUS item: COMMON_APPROVE_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static  enum COMMON_ONLINE_STATUS {
		ONLINE("已上线"),
		OFFLINE("未上线"),
		DOWN_OFFLINE("已下线");
		private String cnName;
		COMMON_ONLINE_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_ONLINE_STATUS item: COMMON_ONLINE_STATUS.values()){
				if(item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}
		
		public String toString(){
			return this.name();
		}
	}
	
	
	
	
	public static enum COMMON_OBJECT {
		CUSTOMER("客户"),
		USER("用户"),
		
		ACTIVITY("团购活动"),
		ACTIVITY_CONTENT("团购活动内容"),
		STORE("店铺"),
		SCHOOL("学堂"),
		SCHOOL_CLASS("学堂类别"),
		
		ORDER("订单"),
		USER_USER("会员"),
		USER_BACKGROUD("会员背景"),
		USER_AUTHOR_ZHENG("身份证正面"),
		USER_AUTHOR_FAN("身份证反面"),
		USER_AUTHOR_QIYE("企业营业执照"),
		USER_AUTHOR_QIYE_ZHENG("企业法人身份证正面"),
		USER_AUTHOR_QIYE_FAN("企业法人身份证反面"),
		
		PRODUCT("商品"),
		PRODUCT_IMAGE("商品图片"),
		PRODUCT_VIDEO("商品视频"),
		
		ORDER_COMPENSATION("订单补偿"),
		ORDER_REFUNDMENT("订单退款"),
		USER_IMPORT("会员数据导入"),
		USER_RECHARGE("会员充值"),
		USER_DRAW("会员提现"),
		CASH_ACCOUNT("企业账户"),
		USER_CHANNEL("会员渠道");
		
		private String cnName;
		COMMON_OBJECT(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_OBJECT item: COMMON_OBJECT.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	
	public static enum COMMON_TRADR_OBJECT {
		PLAT("平台"),
		SELL("卖家"),
		BUY("买家");
		private String cnName;
		COMMON_TRADR_OBJECT(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_TRADR_OBJECT item: COMMON_TRADR_OBJECT.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_DATA_TYPE {
		SAVE("保存"),
		UPDATE("修改"),
		APPROVE("审核");
		private String cnName;
		COMMON_DATA_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_DATA_TYPE item: COMMON_DATA_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum SEARCH_TYPE{
		COMPANY_TIME("公司工作时段"),
		COMPANY_DAY("公司工作天"),
		COMPANY("公司"), 
		GROUP("用户组"),
		SEAT("座席"),
		USER("用户");
		private String cnName;
		SEARCH_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(SEARCH_TYPE item: SEARCH_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return "code:"+this.name()+",cnName:"+this.cnName;
		}
	}
	 	
	public static enum COMMON_MOBILE_STATUS {
		SUCCESS("成功"),
		NOCONN("未接通"),
		REJECT("拒接"),
		EMPTY("空号"),
		WRONG("错号");
		private String cnName;
		COMMON_MOBILE_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_MOBILE_STATUS item: COMMON_MOBILE_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_COPY_STATUS {
		START("复制开始"),
		HEADLE("复制中"),
		END("复制完成");
		private String cnName;
		COMMON_COPY_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_COPY_STATUS item: COMMON_COPY_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
	public static enum COMMON_ACCESS_STATUS {
		OUT("外部访问"),
		IN("内部访问");
		private String cnName;
		COMMON_ACCESS_STATUS(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(COMMON_ACCESS_STATUS item: COMMON_ACCESS_STATUS.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return this.name();
		}
	}
	
}


